:root {
  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color-scheme: light dark;
  color: rgba(255, 255, 255, 0.87);
  background-color: #242424;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}
a:hover {
  color: #535bf2;
}

body {
  font-family: "Microsoft YaHei", Arial, sans-serif;
  background: #f7f8fa;
  margin: 0;
  padding: 0;
}

h2 {
  color: #2d3a4b;
  margin-top: 20px;
}

form, ul {
  margin: 20px 0;
}

input, select, button {
  margin: 4px 6px 4px 0;
  padding: 6px 10px;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  font-size: 15px;
}

button {
  background: #409eff;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

button:hover {
  background: #66b1ff;
}

ul {
  list-style: none;
  padding: 0;
}

li {
  background: #fff;
  margin-bottom: 8px;
  padding: 10px 12px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  display: flex;
  align-items: center;
}

li img {
  border-radius: 4px;
  margin-right: 10px;
}

@media (max-width: 600px) {
  input, select, button {
    font-size: 13px;
    padding: 4px 6px;
  }
  li {
    flex-direction: column;
    align-items: flex-start;
  }
}

h1 {
  font-size: 3.2em;
  line-height: 1.1;
}

button {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.6em 1.2em;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: #1a1a1a;
  cursor: pointer;
  transition: border-color 0.25s;
}
button:hover {
  border-color: #646cff;
}
button:focus,
button:focus-visible {
  outline: 4px auto -webkit-focus-ring-color;
}

.card {
  padding: 2em;
}

#app {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
}

@media (prefers-color-scheme: light) {
  :root {
    color: #213547;
    background-color: #ffffff;
  }
  a:hover {
    color: #747bff;
  }
  button {
    background-color: #f9f9f9;
  }
}

.device-list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 0;
}

.device-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 16px;
  width: 320px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
}

.device-img {
  width: 100%;
  max-width: 280px;
  max-height: 160px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 10px;
}

.device-info {
  font-size: 15px;
  margin-bottom: 10px;
}

.device-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.pagination {
  margin: 20px 0;
  text-align: center;
}

/* 全局页面标题样式 - 在蓝色背景下更加醒目 */
.page-title {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff !important;
  margin: 0 0 6px 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: -0.5px;
}

.page-subtitle {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9) !important;
  margin: 0;
  font-weight: 400;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* 页面头部背景样式 */
.page-header {
  background: linear-gradient(135deg, #409eff 0%, #337ecc 100%);
  color: white;
  border-radius: 12px;
  padding: 24px 32px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 16px rgba(64, 158, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  pointer-events: none;
}

.page-header .header-content {
  flex: 1;
  position: relative;
  z-index: 1;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .page-title {
    font-size: 20px;
  }
  
  .page-subtitle {
    font-size: 14px;
  }
  
  .page-header {
    padding: 20px 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 18px;
  }
  
  .page-subtitle {
    font-size: 13px;
  }
  
  .page-header {
    padding: 16px 20px;
  }
}
